<template>
  <div class='search-all-content'>
    <van-nav-bar
      right-text="搜索"
      left-arrow
      @click-left="$router.back()"
      @click-right="onSearch"
      class="nav-bar-fixed"
    >
      <div slot="title">
        <van-search  placeholder="搜索我的全部内容" v-model="value" @search="onSearch"/>
      </div>
    </van-nav-bar>
   </div>
</template>

<script>
export default {
  name: 'search-all-content',
  components: {},
  data () {
    return {
      value: ''
    }
  },
  created () {},
  methods: {
    onSearch (val) {
      this.$toast(this.value)
    }
  }
}
</script>
<style lang="scss" scoped>
::v-deep.van-nav-bar {
  .van-nav-bar__title,
  .van-ellipsis {
    // flex:1;
    width: 80%;
    max-width: 80%;
    font-weight: 400;
    font-size: 14px;
  }
}
::v-deep.nav-search {
  // flex:1;
  // border-radius: 30px;
  // width: 100%;
  // padding: 2px 10px;
  margin: 0 15px;
  // background-color: #ccc;
}
</style>
